package cn.lingyangwl.agile.pay.pay.controller.refund;

import cn.lingyangwl.agile.pay.common.annotation.PayCheck;
import cn.lingyangwl.framework.core.response.Resp;
import cn.lingyangwl.agile.pay.model.rqrs.pay.refund.RefundOrderQO;
import cn.lingyangwl.agile.pay.validation.PaySignGroup;
import cn.lingyangwl.agile.pay.pay.process.refund.QueryRefundOrderProcess;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 商户退款单查询controller
 *
 * @author shenguangyang
 */
@Slf4j
@RestController
@RequestMapping("/pay/refund")
public class QueryRefundOrderController {

    @Resource
    private QueryRefundOrderProcess queryRefundOrderProcess;

    /**
     * 查单接口
     */
    @GetMapping("/getRefundOrder")
    @PayCheck
    public Resp<?> getRefundOrder(@Validated(value = PaySignGroup.class) RefundOrderQO rq) {
        return queryRefundOrderProcess.getRefundOrder(rq);
    }
}
